package com.second.mapper;

import com.second.model.pojo.FUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface FUserMapper extends JpaRepository<FUser,Integer> {

    //查询用户
    @Query("from FUser where telNumber=:TelNumber")
    FUser findByTelNumber(@Param("TelNumber") String TelNumber);

    ArrayList<FUser> findAll();

    FUser getById(Integer id);
}
